package com.ruoyi.cms.navItem.controller;


import com.ruoyi.cms.navItem.domain.CmsNavItem;
import com.ruoyi.cms.navItem.service.ICmsNavItemService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController("SiteCmsNavItemController")
@RequestMapping("/site/cms/nav/item")
public class CmsNavItemController {

    @Resource
    private ICmsNavItemService cmsNavItemService;

    @GetMapping("/list/{IdentityKey}")
    public AjaxResult list(@PathVariable(value = "IdentityKey", required = true) String IdentityKey) {
        List<CmsNavItem> list = cmsNavItemService.selectCmsNavItemListByCmsNavTypeKey(IdentityKey);
        return AjaxResult.success(list);
    }

}
